FROM openjdk:8u171-jdk-alpine
MAINTAINER hulk <29572320@qq.com>
COPY ratel-notify.jar /app/app.jar
WORKDIR /app
VOLUME ["/app/logs"]
RUN apk add --no-cache tzdata
ENV TZ Asia/Shanghai
ENV JVM_OPTS="-Xms2g -Xmx2g -Xss512K -XX:MetaspaceSize=256m" JAVA_OPTS="-server -XX:+UseG1GC $JVM_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=logs/ -XX:+PrintGCDateStamps -verbose:gc -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -Xloggc:logs/gc-%t.log"
#ENV APP_OPTS $JAVA_OPTS -Dreactor.trace.operatorStacktrace=true -Dspring.profiles.active=product
ENV APP_OPTS $JAVA_OPTS -Dreactor.trace.operatorStacktrace=true
EXPOSE 19082
ENTRYPOINT ["sh", "-c", "java $APP_OPTS -jar app.jar"]
CMD ["--spring.profiles.active=local"]